@extends('.web.layout')

@section('title','政策详情')
@section('head')
    <link href="/code/css/main.css" rel="stylesheet" />
@endsection
@section('content')
    <header class="mui-bar mui-bar-nav">
        <span href="###" class="mui-pull-left return" onclick="history.back()">
            <img src="/code/images/back.png" />
        </span>
        <h1 class="mui-title">政策详情</h1>

    </header>
    <div class="mui-content">
        <div class="detail">
            <div class="detail-title">{{$post->post_title}}</div>
            <div class="detail-time">{{$post->created_at->format('m/d H:i')}}</div>
            <!-- <div class="detail-img"><img src="{{asset('storage/'.$post->thumb)}}"></div> -->
            <div class="detail-content">
                {!! $post->content !!}
            </div>
        </div>
        @if($post->file&&$post->file[1]['savepath'])
            @if(strpos($_SERVER['HTTP_USER_AGENT'],'MicroMessenger') !== false)
                <div class="mui-bar mui-load">
                    <a href="javascript:alert('请在右上角使用浏览器打开本页面下载')">
                        <span class="load-icon"></span>
                        <span class="load-text">下载文件</span>
                    </a>
                </div>
                @else
                <div class="mui-bar mui-load">
                    <a href="{{asset('storage/'.$post->file[1]['savepath'])}}">
                        <span class="load-icon"></span>
                        <span class="load-text">下载文件</span>
                    </a>
                </div>
                @endif

        @endif
    </div>
@endsection